package homeword;
//找101~200的质数

public class primeNumber {
    public static void main(String[] args) {
        int count = 0;

        for (int i = 101; i < 200; i++) {
            boolean flag = true;
            for (int j = 2; j < i - 1; j++) {
                if (i % j == 0) {

                    flag = false;
                    break;
                }
            }

            if (flag) {
                count++;
                System.out.println("这个数字是质数" + i);
            }
        }
        System.out.println("一共有" + count + "个质数");
    }

}
